<?php
include_once("codelibrary/inc/variables.php");
include_once("session.php");
include_once("codelibrary/inc/functions.php");


$business_id = $_SESSION['business_id'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<select name="TR_StaffMember">
<?php
$interval = "8 minutes";
$value_minutes_array = explode(" ",$interval);
$value_minutes = $value_minutes_array[0];
$start_seconds = $value_minutes*60;
$end_seconds = 24*3600;

$increment = $value_minutes*60;

while($start_seconds<=$end_seconds)
{
   $minute_value = $start_seconds/60;
   
   if($minute_value<60)
   {
       $displayed_value = $minute_value." minutes";
        ?>
		<option value="<?=$displayed_value;?>"><?=$displayed_value;?></option>
		<?php
   }
   else
   {
       $hour_displayed_value = floor($minute_value/60);
	   $minute_displayed_value = $minute_value%60;
	   
	   if($minute_displayed_value!=0)
	   {
	       $displayed_value = $hour_displayed_value." hours ".$minute_displayed_value." minutes";
	   }
	   else
	   {
	       $displayed_value = $hour_displayed_value." hours ";
	   }
	   ?>
		<option value="<?=$displayed_value;?>"><?=$displayed_value;?></option>
		<?php
   }
   
   $start_seconds = $start_seconds + $increment;
}
?>
</select>
</body>
</html>
